<template>
  <div>
    <el-container>
      <el-main>
        <el-container class="parent-body">
          <el-header class="content-header">
            <i class="el-icon-s-unfold"></i>
            数据列表
          </el-header>
          <el-main class="info-main padding-style">
            <el-table :data="tableData" border style="width: 100%">
              <el-table-column prop="id" label="编号">
                <template slot-scope="scope">{{scope.row.id}}</template>
              </el-table-column>
              <el-table-column prop="seckillName" label="秒杀时段名称">
                <template slot-scope="scope">{{ scope.row.seckillName}}</template>
              </el-table-column>
              <el-table-column prop="startTime" label="每日开始时间">
                <template slot-scope="scope">{{ scope.row.startTime}}</template>
              </el-table-column>
              <el-table-column prop="endTime" label="每日结束时间">
                <template slot-scope="scope">{{ scope.row.endTime}}</template>
              </el-table-column>
              <el-table-column prop="skuNum" label="商品数量">
                <template slot-scope="scope">{{ scope.row.skuNum}}</template>
              </el-table-column>
              <el-table-column label="操作">
                <template slot-scope="scope">
                  <el-button size="mini" @click="GoodList(scope.$index, scope.row)" type="text">商品列表</el-button>
                </template>
              </el-table-column>
            </el-table>
          </el-main>
        </el-container>
      </el-main>
    </el-container>
  </div>
</template>
<script>
import seckillListApi from "@/api/operate/seckillTime";
export default {
  data() {
    return {
      tableData: []
    };
  },
  methods: {
    GoodList() {
      this.$router.push("/operation/secondsKillGoodList");
    },

    indata(){
      seckillListApi.getFindTimeTwoList().then(Response =>{
        this.tableData=Response.data.data
      })
    },
  },
  mounted(){
    this.indata();
  }
};
</script>
<style scoped>
.parent-body .content-header {
  text-align: left;
  float: left;
  padding-left: 20px;
}
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
}
.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
}

body > .el-container {
  margin-bottom: 40px;
}
</style>
